import requests from '@/utils/request'

// 获取用户定制的板块
export const GetFlexBlock = () => {
  return requests({
    url: '/v1/datlibFlex/block/',
    method: 'get'
  })
}

// 获取用户板块下定制的品种
export const GetFlexBlockVariety = (bid) => {
  return requests({
    url: '/v1/datlibFlex/block/variety/',
    method: 'get',
    params: { bid }
  })
}

// 板块下的定制指标组
export const GetFlexBlockIndexGroup = (bid) => {
  return requests({
    url: '/v1/datlibFlex/block/indexGroups/',
    method: 'get',
    params: { bid }
  })
}

// 用户提取数据
export const ExtraFlexIndexData = (data) => {
  return requests({
    url: '/v1/datlibFlex/extradb/',
    method: 'post',
    timeout: 60000,
    data,
  })
}
